version: '2.1'
services:
- name: etcd-proxy
  endpoints:
  - name: ETCD_PROXY_ENDPOINTS
    protocol: http
    port: {{ etcd_port_c1 }}
  health:
    name: etcd-proxy
    model: tcp
    address: 127.0.0.1:{{ etcd_port_c1 }}
    max_errors_num: 3
    time_interval: 5
  after:
    - docker
  type: simple
  pre_start: docker rm etcd-proxy
  start: {{ rbd_dir }}/scripts/start-etcd-proxy.sh
  stop: docker stop etcd-proxy
  restart_policy: always
  restart_sec: 10